<template>
  <!--按照热门排序-->
  <div style="width: 1200px;margin: 0 auto">
    <el-row :gutter="40">
      <el-col :span="4" v-for="a in arr">
        <router-link to="" style="text-decoration: none">
          <router-link to="/movie">
            <div class="movie-item">
              <img :src="a.imgUrl" style="width: 100%;height: 100%">
              <p>{{ a.title }}</p>
            </div>
          </router-link>

        </router-link>
        <h3 style="text-align: center;font-size: 24px;color: yellowgreen;margin: 0">{{ a.score }}</h3>
      </el-col>

      <el-col :span="4" v-for="a in arr" style="margin-top: 40px">
        <router-link to="" style="text-decoration: none">
          <div class="movie-item">
            <img :src="a.imgUrl" style="width: 100%;height: 100%">
            <p>{{ a.title }}</p>
          </div>
        </router-link>
        <h3 style="text-align: center;font-size: 24px;color: yellowgreen;margin: 0">{{ a.score }}</h3>
      </el-col>

      <el-col :span="4" v-for="a in arr" style="margin-top: 40px">
        <router-link to="" style="text-decoration: none">
          <div class="movie-item">
            <img :src="a.imgUrl" style="width: 100%;height: 100%">
            <p>{{ a.title }}</p>
          </div>
        </router-link>
        <h3 style="text-align: center;font-size: 24px;color: yellowgreen;margin: 0">{{ a.score }}</h3>
      </el-col>

      <el-col :span="4" v-for="a in arr" style="margin-top: 40px">
        <router-link to="" style="text-decoration: none">
          <div class="movie-item">
            <img :src="a.imgUrl" style="width: 100%;height: 100%">
            <p>{{ a.title }}</p>
          </div>
        </router-link>
        <h3 style="text-align: center;font-size: 24px;color: yellowgreen;margin: 0">{{ a.score }}</h3>
      </el-col>

      <el-col :span="4" v-for="a in arr" style="margin-top: 40px">
        <router-link to="" style="text-decoration: none">
          <div class="movie-item">
            <img :src="a.imgUrl" style="width: 100%;height: 100%">
            <p>{{ a.title }}</p>
          </div>
        </router-link>
        <h3 style="text-align: center;font-size: 24px;color: yellowgreen;margin: 0">{{ a.score }}</h3>
      </el-col>
    </el-row>

  </div>
</template>

<script setup>
import {onMounted, ref} from "vue";


const arr = ref([{"imgUrl": "imgs/xq1.jpg", "title": "志愿军：雄兵出击", "score": "9.7"},
  {"imgUrl": "imgs/xq1.jpg", "title": "志愿军：雄兵出击", "score": "9.7"},
  {"imgUrl": "imgs/xq1.jpg", "title": "志愿军：雄兵出击", "score": "9.7"},
  {"imgUrl": "imgs/xq1.jpg", "title": "志愿军：雄兵出击", "score": "9.7"},
  {"imgUrl": "imgs/xq1.jpg", "title": "志愿军：雄兵出击", "score": "9.7"},
  {"imgUrl": "imgs/xq1.jpg", "title": "志愿军：雄兵出击", "score": "9.7"},])
</script>

<style scoped>
.movie-item p {
  text-align: center;
  font-size: 18px;
  color: black;
}

img:hover {
  transform: scale(1.2);
}
</style>